<?php
/* 
 * This view lists all interests and a link to add a interest to a users
 *  personal interests
 */
// opens a form
echo form_open('interests/addInterestToInterests');

echo "<p><label for='interest'>New interest:</label><br/>";
$data = array('name'=>'interestName','id'=>'interestsName','size'=>25);
echo form_input($data) ."</p>";

echo form_submit('submit','create new interest');
echo form_close();

// goes through all results and puts each result into an array. sends id back to the controller
foreach ($results as $key => $list)
{
    echo $list['interestName'] . ' ';
    echo anchor('interests/addInterestToUser/' . $list['id'], 'Add Interest');
    echo '<br />';
}

?>
<br />
